package com.cn.study.second.stage.code3.zuoye3;

public class Test {
    public static void main(String[] args) {
        System.out.println("============================注册手机==================================");
        //  订购通话套餐
        Abstract CallPackage = new CallPackage(1,0,0);
        //  订购上网套餐
        Abstract code0203InternetPackage = new InternetPackage(1,0);
        //  创建消费统计
        Consumption Consumption = new Consumption(CallPackage.getQuantity(),InternetPackage.getQuantity(),20);
        //  注册一张手机卡，枚举手机卡类型：大卡
        PhoneCard phoneCard = new PhoneCard(Enum.B.getSize(),"15718882109","张三","123456",990000,
                CallPackage.getQuantity(),code0203InternetPackage.getQuantity());
        //  打印手机卡信息
        phoneCard.show(CallPackage.getQuantity(),code0203InternetPackage.getQuantity());

        // 消费
        phoneCard.addCall(120,phoneCard);
        phoneCard.addInternet(20,phoneCard);

        //显示账户余额
        phoneCard.showAccountBalance();

        //再次消费测试
        phoneCard.addCall(120,phoneCard);
        phoneCard.addInternet(20,phoneCard);
        phoneCard.addCall(120,phoneCard);
        phoneCard.addInternet(20,phoneCard);
        phoneCard.showAccountBalance();
    }
}
